home *** CD-ROM | disk | FTP | other *** search
/ MacFormat 1995 June / MacFormat 25.iso / Shareware City / Developers / OutOfPhase1.1 Source / OutOfPhase Folder / LFOSpecifier.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-12-10  |  2.7 KB  |  102 lines  |  [TEXT/KAHL]

  1. /* LFOSpecifier.h */
  2.  
  3. #ifndef Included_LFOSpecifier_h
  4. #define Included_LFOSpecifier_h
  5.  
  6. /* LFOSpecifier module depends on */
  7. /* MiscInfo.h */
  8. /* Audit */
  9. /* Debug */
  10. /* Definitions */
  11. /* Memory */
  12. /* Envelope */
  13. /* SampleSelector */
  14.  
  15. /* forward declarations */
  16. struct EnvelopeRec;
  17. struct SampleSelectorRec;
  18.  
  19. /* what kind of oscillator is the LFO */
  20. typedef enum
  21.     {
  22.         eLFOConstant1 EXECUTE(= -12492),
  23.         eLFOSignedSine,
  24.         eLFOPositiveSine,
  25.         eLFOSignedTriangle,
  26.         eLFOPositiveTriangle,
  27.         eLFOSignedSquare,
  28.         eLFOPositiveSquare,
  29.         eLFOSignedRamp,
  30.         eLFOPositiveRamp,
  31.         eLFOSignedLinearFuzzTriangle,
  32.         eLFOPositiveLinearFuzzTriangle,
  33.         eLFOSignedLinearFuzzSquare,
  34.         eLFOPositiveLinearFuzzSquare,
  35.         eLFOWaveTable
  36.     } LFOOscTypes;
  37.  
  38. /* ways the LFO can be used to modulate the signal */
  39. typedef enum
  40.     {
  41.         eLFOAdditive EXECUTE(= -942),
  42.         eLFOMultiplicative,
  43.         eLFOInverseMultiplicative
  44.     } LFOModulationTypes;
  45.  
  46. /* this is the algorithm that will be used to combine the signal & modulator */
  47. typedef enum
  48.     {
  49.         eLFOArithmetic EXECUTE(= -12481), /* add signals */
  50.         eLFOGeometric, /* add base-2 logs of signals & exp */
  51.         eLFOHalfSteps /* add base-2 logs of signal and modulator/12 */
  52.     } LFOAdderMode;
  53.  
  54. struct LFOSpecRec;
  55. typedef struct LFOSpecRec LFOSpecRec;
  56.  
  57. /* create a new LFO specification record */
  58. LFOSpecRec*                        NewLFOSpecifier(void);
  59.  
  60. /* dispose an LFO specification */
  61. void                                    DisposeLFOSpecifier(LFOSpecRec* LFOSpec);
  62.  
  63. /* get the frequency envelope record */
  64. struct EnvelopeRec*        GetLFOSpecFrequencyEnvelope(LFOSpecRec* LFOSpec);
  65.  
  66. /* get the amplitude envelope record */
  67. struct EnvelopeRec*        GetLFOSpecAmplitudeEnvelope(LFOSpecRec* LFOSpec);
  68.  
  69. /* get the oscillator type for this LFO specifier */
  70. LFOOscTypes                        LFOSpecGetOscillatorType(LFOSpecRec* LFOSpec);
  71.  
  72. /* change the oscillator type */
  73. void                                    SetLFOSpecOscillatorType(LFOSpecRec* LFOSpec, LFOOscTypes NewType);
  74.  
  75. /* get the oscillator modulation mode */
  76. LFOModulationTypes        LFOSpecGetModulationMode(LFOSpecRec* LFOSpec);
  77.  
  78. /* change the oscillator modulation mode */
  79. void                                    SetLFOSpecModulationMode(LFOSpecRec* LFOSpec,
  80.                                                 LFOModulationTypes NewType);
  81.  
  82. /* find out what the adding mode of the LFO is */
  83. LFOAdderMode                    LFOSpecGetAddingMode(LFOSpecRec* LFOSpec);
  84.  
  85. /* set a new adding mode for the LFO */
  86. void                                    SetLFOSpecAddingMode(LFOSpecRec* LFOSpec,
  87.                                                 LFOAdderMode NewAddingMode);
  88.  
  89. /* for wave table lfo oscillators only */
  90. struct EnvelopeRec*        GetLFOSpecWaveTableIndexEnvelope(LFOSpecRec* LFOSpec);
  91.  
  92. /* get the sample selector list */
  93. struct SampleSelectorRec*    GetLFOSpecSampleSelector(LFOSpecRec* LFOSpec);
  94.  
  95. /* set the extra value */
  96. void                                    SetLFOSpecExtraValue(LFOSpecRec* LFOSpec, double Value);
  97.  
  98. /* get the extra value */
  99. double                                GetLFOSpecExtraValue(LFOSpecRec* LFOSpec);
  100.  
  101. #endif
  102.